package org.exampledriven;

import org.apache.thrift.TException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SnowflakeServiceHandler implements SnowflakeService.Iface{

    @Autowired
    IdGeneratorSnowflake idGeneratorSnowflake;

    @Override
    public Snowflake getId() throws TException {
        Snowflake snowflake = new Snowflake();
        snowflake.setId(idGeneratorSnowflake.snowflakeId()+"");
        return snowflake;
    }
//    public Snowflake getId() throws TException {
//        Snowflake snowflake = new Snowflake();
//        snowflake.setId(idGeneratorSnowflake.snowflakeId()+"");
//        return snowflake;
//    }

}
